# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor: Angel 'angvp' Velasquez <angvp@archlinux.org>
# Contributor: Gerardo Exequiel Pozzi <vmlinuz386@gmail.com>
# Contributor: Patrick Melo <patrick@patrickmelo.eti.br>

pkgname=geany-plugins
pkgver=2.0
pkgrel=1
pkgdesc='Plugins for Geany'
arch=(loong64 x86_64)
url='https://plugins.geany.org/'
license=(GPL)
depends=(ctpl "geany>=$pkgver" gpgme gtkspell3 libgit2 lua51 python vte3 webkit2gtk)
makedepends=(cppcheck intltool)
source=("$url$pkgname/$pkgname-$pkgver.tar.bz2"{,.sig})
validpgpkeys=('986FA7E80256D3D16F30FB7A01380DF54FD09D02') # Frank Lanitz <frank@geany.org>
sha256sums=('9fc2ec5c99a74678fb9e8cdfbd245d3e2061a448d70fd110a6aefb62dd514705'
            'SKIP')
b2sums=('6175f91a3a7effa081393e9397336e0f5f59846fdadd0e31584f237c14863016cc4ab1b17745e1e2804ad88161dc7e43aef97a2332a5c18a7f1baf10d2ea42ba'
        'SKIP')

prepare() {
  cd $pkgname-$pkgver
  autoreconf -fi
}

build() {
  cd $pkgname-$pkgver
  export CFLAGS+=' -w' PYTHON=/usr/bin/python
  ./configure --prefix=/usr --libexecdir=/usr/lib
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  make -C $pkgname-$pkgver DESTDIR="$pkgdir" install
}
